@extends('admin.layouts.app')


@section('content')

                        <!-- Page-Title -->
                        <div class="row">
                            <div class="col-sm-12">
                                <h4 class="page-title">租赁管理</h4>
                                <ol class="breadcrumb">
                                    <li><a href="{{url('zadmin')}}">系统</a></li>
                                   
                                    <li class="active">租赁列表</li>
                                </ol>
                            </div>
                        </div>
                        
                        <div class="row">
                        	<div class="col-lg-12">
                        		<div class="card-box">
                        			<div class="row">
			                        	<div class="col-sm-8">
			                        		<form role="form" id="form1">
			                                    <div class="form-group contact-search  col-sm-6">
			                                    	<input type="text" name="keyword" class="form-control " placeholder="输入手机号/车牌号搜索" value="{{array_get($param,'keyword')}}">
                                          </div>
                                         <div class="col-sm-3">
                  <button type="button" id="srcBtn" class="btn btn-white btn-sm"><i class="fa fa-search">搜索</i></button>
               </div>
               <div class="col-sm-3">
                 
                    <button  class="btn btn-success btn-sm" id="exportBtn" type="button"><i class="md  md-file-download">导出</i></button>
                  
               </div>
			                                     <!-- form-group -->
			                                </form>
			                        	</div>
                               
			                        	
			                        </div>

                              @if(session('rs'))
                              <div class="alert alert-{{session('rs')['status']}}">
                                {{ session('rs')['msg'] }}
                              </div>
                              @endif
			                        
                        			<div class="table-responsive">
    <table class="table table-hover">
        <thead>
			<tr>
				<th style="min-width: 35px;">
					<div class="checkbox checkbox-primary checkbox-single m-r-15">
            <input id="action-checkbox" type="checkbox">
              <label for="action-checkbox"></label>
                    </div>
                                                        
													</th>
						           
                        <th>联系人</th>
                       
                        <th>电话</th>

                        <th>车牌号</th>                       
                        
                        <th>租赁时间</th>
                        <th>租出价格</th>
                        <th>审车到期日</th>
                        <th>商业险到期日</th>
                        <th>交强险到期日</th>
                        <th>备注</th>
                        <th>是否推送</th>
                        
                          
                        
                         
						
                         
					<th>操作</th>
					</tr>
					</thead>
											
                    <tbody>

                    @foreach($list as $v)
                        <tr>
                            <td>{{$v->id}}</td>
                            <td>{{$v->name}}</td>                        
                            <td>{{$v->mobile}}</td>

                                                   
                                                    
                      <td>{{$v->car_num}}</td>
                      <td>{{$v->rent_begin}} - {{$v->rent_end}}</td>
                      <td>{{$v->out_price}}</td>
                      <td>{{$v->shenche_date}}</td>
                      <td>{{$v->shangyexian_date}}</td>
                      <td>{{$v->jiaoqiangxian_date}}</td>
                      <td>{{$v->remark}}</td>
                      <td>{{$v->status==1?'是':'不推送'}}</td>
                                                  
                                                    
                                                    
                                                   
                                                   <td><a href="{{url('zadmin/rent-log?rent_id='.$v->id)}}" class="btn btn-primary btn-sm" ><i class="md md-edit"></i>租金记录</a>

                                                      <a href="{{url('zadmin/rent/'.$v->id.'/edit')}}" class="btn btn-info btn-sm" ><i class="md md-edit"></i>详细</a>
                                                      <a href="{{url('zadmin/rent',$v->id)}}" data-method="delete" 
  data-token="{{csrf_token()}}" data-confirm="确定删除吗?" class="btn btn-danger btn-sm"><i class="md md-close"></i>删除</a>
                                                    </td>
                                                </tr>
                                            @endforeach    
                                                
                                               
                                               
                                                
                                               
                                                
                                            
                                            </tbody>
                                        </table>
                                    </div>
                                    {{ $list->appends($param)->links() }}
                        		</div>
                                
                            </div> <!-- end col -->

                            
                        </div>
@endsection

@section('modal')                        

<!-- /.modal -->                        
@endsection                         

                  
            
    
       

           



    
@section('js')
<script type="text/javascript">
    $('.btn-dispath').on('click',function(){
        var task_id = $(this).data('id');
        $('#dispatchModal').modal('show');
        $('input[name="task_id"]').val(task_id);
    });

    $('#srcBtn').on('click',function(){
      var url = "{{url('zadmin/rent')}}";
      $('#form1').attr('action',url).submit(); 
    });
    $('#exportBtn').on('click',function(){
      var url = "{{url('zadmin/rent/export')}}";
      $('#form1').attr('action',url).submit(); 
    });
</script>
         
@endsection
    
